package com.ming.springcloud.consumer.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

@Service
public class DeviceRibbonService {
    @Autowired
    RestTemplate restTemplate;

    public String findDevices(){
        return restTemplate.getForObject("http://student-service-provider/device/findAllDevices", String.class);
    }

    public String findDevicesById(Integer id){
        return restTemplate.getForObject("http://student-service-provider/device/findDevicesById/"+id, String.class);
    }
}
